﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
using System.Web.Mvc;
using System.Web.Routing;
using MvcApplication1.Models;

namespace MvcApplication1
{
    // Note: For instructions on enabling IIS6 or IIS7 classic mode, 
    // visit http://go.microsoft.com/?LinkId=9394801
    public class MvcApplication : System.Web.HttpApplication
    {
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();

            WebApiConfig.Register(GlobalConfiguration.Configuration);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            MiStart();
        }
        protected void MiStart()
    {

     
            Persona persona1 = new Persona();
            persona1.Nombre = "Nicolas";
            persona1.Apellido = "Oulego";
            persona1.Dni = 3213212;

            Persona persona2 = new Persona();
            persona2.Nombre = "Tigre";
            persona2.Apellido = "Oulego";
            persona2.Dni = 3412;

            Persona persona3 = new Persona();
            persona3.Nombre = "Daniela";
            persona3.Apellido = "Oulego";
            persona3.Dni = 3334;



             PersonaContenedor.agregarPersona(persona1);
             PersonaContenedor.agregarPersona(persona2);
             PersonaContenedor.agregarPersona(persona3);
        }
    }
}
